package com.poseidon.admin.busines.center.admin.contaller;

import com.poseidon.admin.busines.center.admin.model.entity.AdminEntity;
import com.poseidon.admin.busines.center.admin.service.AdminService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Slf4j
@Controller
@RequestMapping(value = "/admin")
public class AdminContaller {

    @Autowired
    AdminService adminService;

    @ResponseBody
    @RequestMapping(value = "/save")
    public Boolean save(){
        log.debug("测试数据");
        System.out.println("CS");
        AdminEntity adminEntity = new AdminEntity();
        adminEntity.setCode("93");
        adminEntity.setEmail("1344253408@qq.com");
        adminEntity.setMobile("15899232784");
        adminEntity.setPassword("1111111111");

        return adminService.save(adminEntity);

    }
}
